home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / raid / devRaidLog.h < prev    next >
C/C++ Source or Header  |  1990-10-12  |  1KB  |  44 lines

  1. /* 
  2.  * devRaidLog.h --
  3.  *
  4.  *    Implements logging and recovery for raid devices.
  5.  *
  6.  * Copyright 1990 Regents of the University of California
  7.  * Permission to use, copy, modify, and distribute this
  8.  * software and its documentation for any purpose and without
  9.  * fee is hereby granted, provided that the above copyright
  10.  * notice appear in all copies.  The University of California
  11.  * makes no representations about the suitability of this
  12.  * software for any purpose.  It is provided "as is" without
  13.  * express or implied warranty.
  14.  */
  15.  
  16. #ifndef _DEVRAIDLOG
  17. #define _DEVRAIDLOG
  18.  
  19. #include "sync.h"
  20. #include <sprite.h>
  21. #include "bitvec.h"
  22. #include "devRaid.h"
  23.  
  24. #define RAID_LOG_BUF_SIZE    1000
  25.  
  26. typedef struct {
  27.     Sync_Semaphore     mutex;
  28.     int             enabled;
  29.     int             busy;
  30.     DevBlockDeviceHandle *logHandlePtr;
  31.     int             logDevOffset;
  32.     int             diskLockVecNum;
  33.     int             diskLockVecSize;
  34.     BitVec         diskLockVec;
  35.     int             minLogElem;
  36.     int             maxLogElem;
  37.     Sync_Condition    *waitCurBufPtr;
  38.     Sync_Condition    *waitNextBufPtr;
  39.     Sync_Condition       flushed1;
  40.     Sync_Condition       flushed2;
  41. } RaidLog;
  42.  
  43. #endif /* _DEVRAIDLOG */
  44.